#include "problems/14.h"
#include "gtest/gtest.h"
#include <string>
#include <vector>

using namespace std;

TEST(TestProblemSolutions, TestProblem14)
{
    problem_14::Solution s;
    vector<string> strs{"flower", "flow", "flight"};
    ASSERT_EQ(s.longestCommonPrefix(strs), "fl");
    strs = {"dog", "racecar", "car"};
    ASSERT_EQ(s.longestCommonPrefix(strs), "");
    strs = {};
    ASSERT_EQ(s.longestCommonPrefix(strs), "");
}